import request from '#/utils/requestAbort.js';
import type {} from './type';
import { apiPre } from '../services.js';

// 示例
export async function getRes(params: any) {
  return request('/xxx', {
    method: 'POST',
    data: params,
  });
}

// 披露列名查询
export const monthHeadList = async (marketId: any) => {
  return request(`/market-disclosure/settlementdatadisplayMonthField/list?marketId=${marketId}`, {
    method: 'GET',
  });
};

// 披露列名保存
export const monthHeadListSave = async (data: any) => {
  return request(`/market-disclosure/settlementdatadisplayMonthField/save`, {
    method: 'POST',
    data,
  });
};

// market-disclosure
//查询市场披露数据
export const monthTableDataService = async (data: any) => {
  return request(`/market-disclosure/settlementdatadisplayMonth/list`, {
    method: 'POST',
    data,
  });
};

// 市场披露数据新增
export const saveMonthTableDataService = async (data: any) => {
  return request(`/market-disclosure/settlementdatadisplayMonth/save`, {
    method: 'POST',
    data,
  });
};

// 市场披露数据删除
export const deleteMonthTableDataService = async (recordId: string) => {
  return request(`/market-disclosure/settlementdatadisplayMonth/delete?recordId=${recordId}`, {
    method: 'GET',
  });
};

// 上传文件
export async function upLoadFiles(params: any) {
  return request(`/annex/annex/upLoadFiles`, {
    method: 'POST',
    requestType: 'form',
    data: params,
  });
}

//
// 编辑市场披露数据
export async function monthTableRowEditService(params: any) {
  return request('/market-disclosure/settlementdatadisplayMonth/update', {
    method: 'POST',
    data: params,
  });
}

// 删除字段校验
export function judgmentFieldValue(id: string) {
  return request(`/market-disclosure/settlementdatadisplayMonthField/judgmentFieldValue?id=${id}`, {
    method: 'GET',
  });
}
